<script setup lang='ts'>
import { ElEmpty, ElButton } from 'element-plus'
import { useRouter } from 'vue-router';
import useUserStore from '../../store/modules/user';

let $router = useRouter()
let useUser = useUserStore()

const handlerLogout = async() => {
  await useUser.userLogout()
  $router.push('/login')
}
</script>

<template>
  <div class="error-container">
    <el-empty description="您的账号已被封禁，请联系系统管理员">
      <el-button type="info" @click="handlerLogout">
        返回登陆
      </el-button>
      <el-button type="primary">
        联系管理员
      </el-button>
    </el-empty>
  </div>
</template>

<style scoped lang='scss'>
.error-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  
  :deep(.el-empty) {
    .el-empty__description {
      font-size: 18px;
      color: #f56c6c;
      margin-top: 20px;
    }
  }
}
</style>